﻿using System.ComponentModel.DataAnnotations;
using ApiLib.AppStart;
using SqlSugar;

namespace ApiLib.Models;

/// <summary>
/// 用户角色
/// </summary>
[Tenant(GlobalConstants.MainDbConfigId), SugarTable(TableName = "sys_role")]
public class SysRole : BaseEntityIdentity
{
    /// <summary>
    /// 名称
    /// </summary>
    [SugarColumn(ColumnName = "name")]
    [Required(ErrorMessage = "角色名称不能为空")]
    public string Name { get; set; } = "";

    /// <summary>
    /// 角色
    /// </summary>
    [SugarColumn(ColumnName = "permissions")]
    public string Permissions { get; set; } = "";
}